package net.csdn.business.common.domain.request.pop;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 查询操作列表DTO
 */
@Data
public class QueryInformationListDTO extends QueryRequest{

    // 社区id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;

    // 文章id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long informationId;

    @NotNull(message = "查询栏目不能为空(-1.全部  1.已发布  2.草稿  3.已下线 4.审核中 5.未通过)")
    private Integer informationState=-1;

    @NotNull(message = "是否精选(-1 全部  0.非精选 1.精选)")
    private Integer isSelected=-1;

    private String keyWord;

    private String createId;

    private String createName;

    // 开始时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startTime;

    // 结束时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endTime;

    //按照全都需求，统一参数

    private String keyWords;

    private String userName;
}
